// pages/gift/gift.js
const app = getApp()

Page({

  /**
   * 页面的初始数据
   */
  data: {
    app:app,
    //幻灯片
    //background: ['demo-text-1', 'demo-text-2', 'demo-text-3', 'demo-text-4'],
    background: [{"id":1, "name":"大木山景区"}, {"id":2, "name":"白马湖"}, {"id":3, "name":"驼峰景区"}, {"id":4, "name":"湘湖"}],
    indicatorDots: false,
    vertical: false,
    autoplay: true,
    circular: false,
    interval: 2000,
    duration: 500,
    previousMargin: 0,
    nextMargin: 0,
    swiperUrls:["https://6275-buxucloud-01-7gvvu046d141963a-1324829580.tcb.qcloud.la/swiper1.png?sign=76e0cbd0512d51aa3ce2bfbc9fe78ce0&t=1710233080","https://6275-buxucloud-01-7gvvu046d141963a-1324829580.tcb.qcloud.la/swiper2.png?sign=afd33fad2f2dcddffefc161bcede3844&t=1710229460","https://6275-buxucloud-01-7gvvu046d141963a-1324829580.tcb.qcloud.la/swiper3.png?sign=c8d66bef02858f5d964bc5915d33c28c&t=1710233115","https://6275-buxucloud-01-7gvvu046d141963a-1324829580.tcb.qcloud.la/swiper4.png?sign=678c4d110f1aea88ab246d1088af292d&t=1710229533"],
    funBtnUrls:["https://6275-buxucloud-01-7gvvu046d141963a-1324829580.tcb.qcloud.la/head1.png?sign=dc2d7730ca8a86363e3c8fa35e7e3a83&t=1709888836"],
    filterImg:"",
    testTxt:1,
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {
    wx.setNavigationBarTitle({
      title: '松阳礼物',
    })
    console.log(wx.getAppBaseInfo())
    this.setData({
      filterImg:this.data.swiperUrls[0]
    })
  },
  onSwiperChange(e){
    //console.log("幻灯片滑动了。" + e.detail.current)
    //this.data.testTxt = ""+e.detail.current;
    this.setData({
      testTxt:""+e.detail.current,
      filterImg:this.data.swiperUrls[e.detail.current]
    })
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady() {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide() {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload() {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh() {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom() {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {

  }
})